﻿CREATE TABLE [PR].[DefekturaGoods] (
    [GoodsId]             INT  NOT NULL,
    [DefekturaCategoryId] INT  NOT NULL,
    [SaleDays]            INT  NULL,
    [FullDays]            INT  NULL,
    [PresenceCoef]        REAL NULL,
    CONSTRAINT [PK_DefekturaGoods] PRIMARY KEY NONCLUSTERED ([GoodsId] ASC),
    CONSTRAINT [FK_DefekturaGoods_DefekturaCategories] FOREIGN KEY ([DefekturaCategoryId]) REFERENCES [CO].[DefekturaCategories] ([Id])
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Количество дней продаж', @level0type = N'SCHEMA', @level0name = N'PR', @level1type = N'TABLE', @level1name = N'DefekturaGoods', @level2type = N'COLUMN', @level2name = N'SaleDays';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Количество дней присутствия', @level0type = N'SCHEMA', @level0name = N'PR', @level1type = N'TABLE', @level1name = N'DefekturaGoods', @level2type = N'COLUMN', @level2name = N'FullDays';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Коэффициент присутствия', @level0type = N'SCHEMA', @level0name = N'PR', @level1type = N'TABLE', @level1name = N'DefekturaGoods', @level2type = N'COLUMN', @level2name = N'PresenceCoef';

